/*
 * © 2021 Thoughtworks, Inc.
 */

import {
  COMPUTE_PROCESSOR_TYPES,
  cascadeLakeSkylake,
  broadwellHaswell,
} from '@cloud-carbon-footprint/core'

export const RDS_INSTANCE_TYPES: { [instanceType: string]: number } = {
  'db.m5.24xlarge': 96,
  'db.m5.16xlarge': 64,
  'db.m5.12xlarge': 48,
  'db.m5.8xlarge': 32,
  'db.m5.4xlarge': 16,
  'db.m5.2xlarge': 8,
  'db.m5.xlarge': 4,
  'db.m5.large': 2,
  'db.m4.16xlarge': 64,
  'db.m4.10xlarge': 40,
  'db.m4.4xlarge': 16,
  'db.m4.2xlarge': 8,
  'db.m4.xlarge': 4,
  'db.m4.large': 2,
  'db.m3.2xlarge': 8,
  'db.m3.xlarge': 4,
  'db.m3.large': 2,
  'db.m3.medium': 1,
  'db.m1.xlarge': 4,
  'db.m1.large': 2,
  'db.m1.medium': 1,
  'db.m1.small': 1,
  'db.z1d.12xlarge': 48,
  'db.z1d.6xlarge': 24,
  'db.z1d.3xlarge': 12,
  'db.z1d.2xlarge': 8,
  'db.z1d.xlarge': 4,
  'db.z1d.large': 2,
  'db.x1e.32xlarge': 128,
  'db.x1e.16xlarge': 64,
  'db.x1e.8xlarge': 32,
  'db.x1e.4xlarge': 16,
  'db.x1e.2xlarge': 8,
  'db.x1e.xlarge': 4,
  'db.x1.32xlarge': 128,
  'db.x1.16xlarge': 64,
  'db.r5.24xlarge': 96,
  'db.r5.16xlarge': 64,
  'db.r5.12xlarge': 48,
  'db.r5.8xlarge': 32,
  'db.r5.4xlarge': 16,
  'db.r5.2xlarge': 8,
  'db.r5.xlarge': 4,
  'db.r5.large': 2,
  'db.r4.16xlarge': 64,
  'db.r4.8xlarge': 32,
  'db.r4.4xlarge': 16,
  'db.r4.2xlarge': 8,
  'db.r4.xlarge': 4,
  'db.r4.large': 2,
  'db.r3.8xlarge': 32,
  'db.r3.4xlarge': 16,
  'db.r3.2xlarge': 8,
  'db.r3.xlarge': 4,
  'db.r3.large': 2,
  'db.m2.4xlarge': 8,
  'db.m2.2xlarge': 4,
  'db.m2.xlarge': 2,
  'db.t3.2xlarge': 8,
  'db.t3.xlarge': 4,
  'db.t3.large': 2,
  'db.t3.medium': 2,
  'db.t3.small': 2,
  'db.t3.micro': 2,
  'db.t2.2xlarge': 8,
  'db.t2.xlarge': 4,
  'db.t2.large': 2,
  'db.t2.medium': 2,
  'db.t2.small': 1,
  'db.t2.micro': 1,
  'db.m6g.large': 2,
  'db.m6g.xlarge': 4,
  'db.m6g.2xlarge': 8,
  'db.m6g.4xlarge': 16,
  'db.m6g.8xlarge': 32,
  'db.m6g.12xlarge': 48,
  'db.m6g.16xlarge': 64,
  'db.r6g.large': 2,
  'db.r6g.xlarge': 4,
  'db.r6g.2xlarge': 8,
  'db.r6g.4xlarge': 16,
  'db.r6g.12xlarge': 48,
  'db.r6g.16xlarge': 64,
}
export const CACHE_NODE_TYPES: { [nodeType: string]: number } = {
  'cache.t2.micro': 1,
  'cache.t2.small': 1,
  'cache.t2.medium': 2,
  'cache.t3.micro': 2,
  'cache.t3.small': 2,
  'cache.t3.medium': 2,
  'cache.m4.large': 2,
  'cache.m4.xlarge': 4,
  'cache.m4.2xlarge': 8,
  'cache.m4.4xlarge': 16,
  'cache.m4.10xlarge': 40,
  'cache.m5.large': 2,
  'cache.m5.xlarge': 4,
  'cache.m5.2xlarge': 8,
  'cache.m5.4xlarge': 16,
  'cache.m5.12xlarge': 48,
  'cache.m5.24xlarge': 96,
  'cache.r4.large': 2,
  'cache.r4.xlarge': 4,
  'cache.r4.2xlarge': 8,
  'cache.r4.4xlarge': 16,
  'cache.r4.8xlarge': 32,
  'cache.r4.16xlarge': 64,
  'cache.r5.large': 2,
  'cache.r5.xlarge': 4,
  'cache.r5.2xlarge': 8,
  'cache.r5.4xlarge': 16,
  'cache.r5.12xlarge': 48,
  'cache.r5.24xlarge': 96,
  'cache.m3.medium': 1,
  'cache.m6g.large': 2,
  'cache.m6g.xlarge': 4,
  'cache.m6g.2xlarge': 8,
  'cache.m6g.4xlarge': 16,
  'cache.m6g.8xlarge': 32,
  'cache.m6g.12xlarge': 48,
  'cache.m6g.16xlarge': 64,
  'cache.r3.2xlarge': 8,
  'cache.r6g.large': 2,
  'cache.r6g.xlarge': 4,
  'cache.r6g.2xlarge': 8,
  'cache.r6g.4xlarge': 16,
  'cache.r6g.8xlarge': 32,
  'cache.r6g.12xlarge': 48,
  'cache.r6g.16xlarge': 64,
}

export const MSK_INSTANCE_TYPES: { [instanceType: string]: number } = {
  'Kafka.t3.small': 2,
  'Kafka.m5.large': 2,
  'Kafka.m5.xlarge': 4,
  'Kafka.m5.2xlarge': 8,
  'Kafka.m5.4xlarge': 16,
  'Kafka.m5.8xlarge': 32,
  'Kafka.m5.12xlarge': 48,
  'Kafka.m5.16xlarge': 64,
  'Kafka.m5.24xlarge': 96,
}

export const REDSHIFT_INSTANCE_TYPES: {
  [instanceFamily: string]: { [instanceSize: string]: number[] } // [vcpus, memory]
} = {
  dc2: {
    large: [2, 15],
    '8xlarge': [32, 244],
  },
  ra3: {
    xlplus: [4, 32],
    '4xlarge': [12, 96],
    '16xlarge': [48, 384],
  },
  dc1: {
    large: [2, 15],
    '8xlarge': [32, 244],
  },
  ds2: {
    xlarge: [4, 31],
    '8xlarge': [36, 244],
  },
}

export const EC2_INSTANCE_TYPES: {
  [instanceFamily: string]: { [instanceSize: string]: number[] } // [vcpus, memory, scope3 emissions ]
} = {
  a1: {
    medium: [1, 2, 1.0221904],
    large: [2, 4, 1.0221904],
    xlarge: [4, 8, 1.0221904],
    '2xlarge': [8, 16, 1.0221904],
    '4xlarge': [16, 32, 1.0221904],
    metal: [16, 32, 1.0221904],
  },
  c4: {
    large: [2, 3.75, 1.1610236],
    xlarge: [4, 7.5, 1.1610236],
    '2xlarge': [8, 15, 1.1610236],
    '4xlarge': [16, 30, 1.1610236],
    '8xlarge': [36, 60, 1.1610236],
  },
  c5: {
    large: [2, 4, 1.3440944],
    xlarge: [4, 8, 1.3440944],
    '2xlarge': [8, 16, 1.3440944],
    '4xlarge': [16, 32, 1.3440944],
    '9xlarge': [36, 72, 1.3440944],
    '12xlarge': [48, 96, 1.3440944],
    '18xlarge': [72, 144, 1.3440944],
    '24xlarge': [96, 192, 1.3440944],
    metal: [96, 192, 1.3440944],
  },
  c5a: {
    large: [2, 4, 1.2440944],
    xlarge: [4, 8, 1.2440944],
    '2xlarge': [8, 16, 1.2440944],
    '4xlarge': [16, 32, 1.2440944],
    '8xlarge': [32, 64, 1.2440944],
    '12xlarge': [48, 96, 1.2440944],
    '16xlarge': [64, 128, 1.2440944],
    '24xlarge': [96, 192, 1.2440944],
  },
  c5ad: {
    large: [2, 4, 1.4440944],
    xlarge: [4, 8, 1.4440944],
    '2xlarge': [8, 16, 1.4440944],
    '4xlarge': [16, 32, 1.4440944],
    '8xlarge': [32, 64, 1.4440944],
    '12xlarge': [48, 96, 1.4440944],
    '16xlarge': [64, 128, 1.4440944],
    '24xlarge': [96, 192, 1.4440944],
  },
  c5d: {
    large: [2, 4, 1.5440944],
    xlarge: [4, 8, 1.5440944],
    '2xlarge': [8, 16, 1.5440944],
    '4xlarge': [16, 32, 1.5440944],
    '9xlarge': [36, 72, 1.5440944],
    '12xlarge': [48, 96, 1.7440944],
    '18xlarge': [72, 144, 1.7440944],
    '24xlarge': [96, 192, 1.7440944],
    metal: [96, 192, 1.7440944],
  },
  c5n: {
    large: [2, 5.25, 1.3440944],
    xlarge: [4, 10.5, 1.3440944],
    '2xlarge': [8, 21, 1.3440944],
    '4xlarge': [16, 42, 1.3440944],
    '9xlarge': [36, 96, 1.3440944],
    '18xlarge': [72, 192, 1.3440944],
    metal: [72, 192, 1.3440944],
  },
  c6g: {
    medium: [1, 2, 1.1553328],
    large: [2, 4, 1.1553328],
    xlarge: [4, 8, 1.1553328],
    '2xlarge': [8, 16, 1.1553328],
    '4xlarge': [16, 32, 1.1553328],
    '8xlarge': [32, 64, 1.1553328],
    '12xlarge': [48, 96, 1.1553328],
    '16xlarge': [64, 128, 1.1553328],
    metal: [64, 128, 1.1553328],
  },
  c6gd: {
    medium: [1, 2, 1.3553328],
    large: [2, 4, 1.3553328],
    xlarge: [4, 8, 1.3553328],
    '2xlarge': [8, 16, 1.3553328],
    '4xlarge': [16, 32, 1.3553328],
    '8xlarge': [32, 64, 1.3553328],
    '12xlarge': [48, 96, 1.3553328],
    '16xlarge': [64, 128, 1.3553328],
    metal: [64, 128, 1.3553328],
  },
  c6gn: {
    medium: [1, 2, 1.1553328],
    large: [2, 4, 1.1553328],
    xlarge: [4, 8, 1.1553328],
    '2xlarge': [8, 16, 1.1553328],
    '4xlarge': [16, 32, 1.1553328],
    '8xlarge': [32, 64, 1.1553328],
    '12xlarge': [48, 96, 1.1553328],
    '16xlarge': [64, 128, 1.1553328],
  },
  c6i: {
    large: [2, 4, 1.3329],
    xlarge: [4, 8, 1.3329],
    '2xlarge': [8, 16, 1.3329],
    '4xlarge': [16, 32, 1.3329],
    '8xlarge': [32, 64, 1.3329],
    '12xlarge': [48, 96, 1.3329],
    '16xlarge': [64, 128, 1.3329],
    '24xlarge': [96, 192, 1.3329],
  },
  c6a: {
    large: [2, 4, 1.5104],
    xlarge: [4, 8, 1.5104],
    '2xlarge': [8, 16, 1.5104],
    '4xlarge': [16, 32, 1.5104],
    '8xlarge': [32, 64, 1.5104],
    '12xlarge': [48, 96, 1.5104],
    '16xlarge': [64, 128, 1.5104],
    '24xlarge': [96, 192, 1.5104],
    '32xlarge': [128, 256, 1.5104],
    '48xlarge': [192, 384, 1.5104],
  },
  hpc6a: {
    '48xlarge': [96, 384, 1.5104],
  },
  mac1: {
    metal: [12, 32, 1.0221904],
  },
  m4: {
    large: [2, 8, 1.432856],
    xlarge: [4, 16, 1.432856],
    '2xlarge': [8, 32, 1.432856],
    '4xlarge': [16, 64, 1.432856],
    '10xlarge': [40, 160, 1.432856],
    '16xlarge': [64, 256, 1.432856],
  },
  m5: {
    large: [2, 8, 1.6103792],
    xlarge: [4, 16, 1.6103792],
    '2xlarge': [8, 32, 1.6103792],
    '4xlarge': [16, 64, 1.6103792],
    '8xlarge': [32, 128, 1.6103792],
    '12xlarge': [48, 192, 1.6103792],
    '16xlarge': [64, 256, 1.6103792],
    '24xlarge': [96, 384, 1.6103792],
    metal: [96, 384, 1.6103792],
  },
  m5a: {
    large: [2, 8, 1.6103792],
    xlarge: [4, 16, 1.6103792],
    '2xlarge': [8, 32, 1.6103792],
    '4xlarge': [16, 64, 1.6103792],
    '8xlarge': [32, 128, 1.6103792],
    '12xlarge': [48, 192, 1.6103792],
    '16xlarge': [64, 256, 1.6103792],
    '24xlarge': [96, 384, 1.6103792],
  },
  m5ad: {
    large: [2, 8, 2.0103792],
    xlarge: [4, 16, 2.0103792],
    '2xlarge': [8, 32, 2.0103792],
    '4xlarge': [16, 64, 2.0103792],
    '8xlarge': [32, 128, 2.0103792],
    '12xlarge': [48, 192, 2.0103792],
    '16xlarge': [64, 256, 2.0103792],
    '24xlarge': [96, 384, 2.0103792],
  },
  m5d: {
    large: [2, 8, 2.0103792],
    xlarge: [4, 16, 2.0103792],
    '2xlarge': [8, 32, 2.0103792],
    '4xlarge': [16, 64, 2.0103792],
    '8xlarge': [32, 128, 2.0103792],
    '12xlarge': [48, 192, 2.0103792],
    '16xlarge': [64, 256, 2.0103792],
    '24xlarge': [96, 384, 2.0103792],
    metal: [96, 384, 2.0103792],
  },
  m5dn: {
    large: [2, 8, 2.0103792],
    xlarge: [4, 16, 2.0103792],
    '2xlarge': [8, 32, 2.0103792],
    '4xlarge': [16, 64, 2.0103792],
    '8xlarge': [32, 128, 2.0103792],
    '12xlarge': [48, 192, 2.0103792],
    '16xlarge': [64, 256, 2.0103792],
    '24xlarge': [96, 384, 2.0103792],
    metal: [96, 384, 2.0103792],
  },
  m5n: {
    large: [2, 8, 1.6103792],
    xlarge: [4, 16, 1.6103792],
    '2xlarge': [8, 32, 1.6103792],
    '4xlarge': [16, 64, 1.6103792],
    '8xlarge': [32, 128, 1.6103792],
    '12xlarge': [48, 192, 1.6103792],
    '16xlarge': [64, 256, 1.6103792],
    '24xlarge': [96, 384, 1.6103792],
    metal: [96, 384, 1.6103792],
  },
  m5zn: {
    large: [2, 8, 1.3440944],
    xlarge: [4, 16, 1.3440944],
    '2xlarge': [8, 32, 1.3440944],
    '3xlarge': [12, 48, 1.3440944],
    '6xlarge': [24, 96, 1.3440944],
    '12xlarge': [48, 192, 1.3440944],
    metal: [48, 192, 1.3440944],
  },
  m6g: {
    medium: [1, 4, 1.332856],
    large: [2, 8, 1.332856],
    xlarge: [4, 16, 1.332856],
    '2xlarge': [8, 32, 1.332856],
    '4xlarge': [16, 64, 1.332856],
    '8xlarge': [32, 128, 1.332856],
    '12xlarge': [48, 192, 1.332856],
    '16xlarge': [64, 256, 1.332856],
    metal: [64, 256, 1.332856],
  },
  m6gd: {
    medium: [1, 4, 1.532856],
    large: [2, 8, 1.532856],
    xlarge: [4, 16, 1.532856],
    '2xlarge': [8, 32, 1.532856],
    '4xlarge': [16, 64, 1.532856],
    '8xlarge': [32, 128, 1.532856],
    '12xlarge': [48, 192, 1.532856],
    '16xlarge': [64, 256, 1.532856],
    metal: [64, 256, 1.532856],
  },
  m6i: {
    large: [2, 8, 1.7879024],
    xlarge: [4, 16, 1.7879024],
    '2xlarge': [8, 32, 1.7879024],
    '4xlarge': [16, 64, 1.7879024],
    '8xlarge': [32, 128, 1.7879024],
    '12xlarge': [48, 192, 1.7879024],
    '16xlarge': [64, 256, 1.7879024],
    '24xlarge': [96, 384, 1.7879024],
    '32xlarge': [128, 512, 1.7879024],
    metal: [128, 512, 1.7879024],
  },
  m6a: {
    large: [2, 8, 2.0429],
    xlarge: [4, 16, 2.0429],
    '2xlarge': [8, 32, 2.0429],
    '4xlarge': [16, 64, 2.0429],
    '8xlarge': [32, 128, 2.0429],
    '12xlarge': [48, 192, 2.0429],
    '16xlarge': [64, 256, 2.0429],
    '24xlarge': [96, 384, 2.0429],
    '32xlarge': [128, 512, 2.0429],
    '48xlarge': [192, 768, 2.0429],
    metal: [192, 768, 2.0429],
  },
  p2: {
    xlarge: [4, 61, 4.4930204],
    '8xlarge': [32, 488, 4.4930204],
    '16xlarge': [64, 732, 4.4930204],
  },
  p3: {
    '2xlarge': [8, 61, 3.5429488],
    '8xlarge': [32, 244, 3.5429488],
    '16xlarge': [64, 488, 3.5429488],
  },
  p3dn: {
    '24xlarge': [96, 768, 3.5429488],
  },
  p4d: {
    '24xlarge': [96, 1152, 4.6755184],
  },
  ra3: {
    '4xlarge': [12, 96, 2.1103792],
    '16xlarge': [48, 384, 2.1103792],
  },
  r4: {
    large: [2, 15.25, 1.7546168],
    xlarge: [4, 30.5, 1.7546168],
    '2xlarge': [8, 61, 1.7546168],
    '4xlarge': [16, 122, 1.7546168],
    '8xlarge': [32, 244, 1.7546168],
    '16xlarge': [64, 488, 1.7546168],
  },
  r5: {
    large: [2, 16, 2.1429488],
    xlarge: [4, 32, 2.1429488],
    '2xlarge': [8, 64, 2.1429488],
    '4xlarge': [16, 128, 2.1429488],
    '8xlarge': [32, 256, 2.1429488],
    '12xlarge': [48, 384, 2.1429488],
    '16xlarge': [64, 512, 2.1429488],
    '24xlarge': [96, 768, 2.1429488],
    metal: [96, 768, 2.1429488],
  },
  r5a: {
    large: [2, 16, 2.1429488],
    xlarge: [4, 32, 2.1429488],
    '2xlarge': [8, 64, 2.1429488],
    '4xlarge': [16, 128, 2.1429488],
    '8xlarge': [32, 256, 2.1429488],
    '12xlarge': [48, 384, 2.1429488],
    '16xlarge': [64, 512, 2.1429488],
    '24xlarge': [96, 768, 2.1429488],
  },
  r5ad: {
    large: [2, 16, 2.5429488],
    xlarge: [4, 32, 2.5429488],
    '2xlarge': [8, 64, 2.5429488],
    '4xlarge': [16, 128, 2.5429488],
    '8xlarge': [32, 256, 2.5429488],
    '12xlarge': [48, 384, 2.5429488],
    '16xlarge': [64, 512, 2.5429488],
    '24xlarge': [96, 768, 2.5429488],
  },
  r5b: {
    large: [2, 16, 2.1429488],
    xlarge: [4, 32, 2.1429488],
    '2xlarge': [8, 64, 2.1429488],
    '4xlarge': [16, 128, 2.1429488],
    '8xlarge': [32, 256, 2.1429488],
    '12xlarge': [48, 384, 2.1429488],
    '16xlarge': [64, 512, 2.1429488],
    '24xlarge': [96, 768, 2.1429488],
    metal: [96, 768, 2.1429488],
  },
  r5d: {
    large: [2, 16, 2.5429488],
    xlarge: [4, 32, 2.5429488],
    '2xlarge': [8, 64, 2.5429488],
    '4xlarge': [16, 128, 2.5429488],
    '8xlarge': [32, 256, 2.5429488],
    '12xlarge': [48, 384, 2.5429488],
    '16xlarge': [64, 512, 2.5429488],
    '24xlarge': [96, 768, 2.5429488],
    metal: [96, 768, 2.5429488],
  },
  r5dn: {
    large: [2, 16, 2.5429488],
    xlarge: [4, 32, 2.5429488],
    '2xlarge': [8, 64, 2.5429488],
    '4xlarge': [16, 128, 2.5429488],
    '8xlarge': [32, 256, 2.5429488],
    '12xlarge': [48, 384, 2.5429488],
    '16xlarge': [64, 512, 2.5429488],
    '24xlarge': [96, 768, 2.5429488],
    metal: [96, 768, 2.5429488],
  },
  r5n: {
    large: [2, 16, 2.1429488],
    xlarge: [4, 32, 2.1429488],
    '2xlarge': [8, 64, 2.1429488],
    '4xlarge': [16, 128, 2.1429488],
    '8xlarge': [32, 256, 2.1429488],
    '12xlarge': [48, 384, 2.1429488],
    '16xlarge': [64, 512, 2.1429488],
    '24xlarge': [96, 768, 2.1429488],
    metal: [96, 768, 2.1429488],
  },
  r6g: {
    medium: [1, 8, 1.6879024],
    large: [2, 16, 1.6879024],
    xlarge: [4, 32, 1.6879024],
    '2xlarge': [8, 64, 1.6879024],
    '4xlarge': [16, 128, 1.6879024],
    '8xlarge': [32, 256, 1.6879024],
    '12xlarge': [48, 384, 1.6879024],
    '16xlarge': [64, 512, 1.6879024],
    metal: [64, 512, 1.6879024],
  },
  r6gd: {
    medium: [1, 8, 1.8879024],
    large: [2, 16, 1.8879024],
    xlarge: [4, 32, 1.8879024],
    '2xlarge': [8, 64, 1.8879024],
    '4xlarge': [16, 128, 1.8879024],
    '8xlarge': [32, 256, 1.8879024],
    '12xlarge': [48, 384, 1.8879024],
    '16xlarge': [64, 512, 1.8879024],
    metal: [64, 512, 1.8879024],
  },
  r6i: {
    large: [2, 16, 1.0],
    xlarge: [4, 32, 1.0],
    '2xlarge': [8, 64, 1.0],
    '4xlarge': [16, 128, 1.0],
    '8xlarge': [32, 256, 1.0],
    '12xlarge': [48, 384, 1.0],
    '16xlarge': [64, 512, 1.0],
    '24xlarge': [96, 768, 1.0],
    '32xlarge': [128, 1024, 1.0],
    metal: [128, 1024, 1.0],
  },
  t2: {
    nano: [1, 0.5, 1.4772368],
    micro: [1, 1, 1.4772368],
    small: [1, 2, 1.4772368],
    medium: [2, 4, 1.4772368],
    large: [2, 8, 1.4772368],
    xlarge: [4, 16, 1.4772368],
    '2xlarge': [8, 32, 1.4772368],
  },
  t3: {
    nano: [2, 0.5, 1.6103792],
    micro: [2, 1, 1.6103792],
    small: [2, 2, 1.6103792],
    medium: [2, 4, 1.6103792],
    large: [2, 8, 1.6103792],
    xlarge: [4, 16, 1.6103792],
    '2xlarge': [8, 32, 1.6103792],
  },
  t3a: {
    nano: [2, 0.5, 1.6103792],
    micro: [2, 1, 1.6103792],
    small: [2, 2, 1.6103792],
    medium: [2, 4, 1.6103792],
    large: [2, 8, 1.6103792],
    xlarge: [4, 16, 1.6103792],
    '2xlarge': [8, 32, 1.6103792],
  },
  t4g: {
    nano: [2, 0.5, 1.332856],
    micro: [2, 1, 1.332856],
    small: [2, 2, 1.332856],
    medium: [2, 4, 1.332856],
    large: [2, 8, 1.332856],
    xlarge: [4, 16, 1.332856],
    '2xlarge': [8, 32, 1.332856],
  },
  x1: {
    '16xlarge': [64, 976, 4.1850384],
    '32xlarge': [128, 1952, 4.1850384],
  },
  x1e: {
    xlarge: [4, 122, 6.8922672],
    '2xlarge': [8, 244, 6.8922672],
    '4xlarge': [16, 488, 6.8922672],
    '8xlarge': [32, 976, 6.8922672],
    '16xlarge': [64, 1952, 6.8922672],
    '32xlarge': [128, 3904, 6.8922672],
  },
  x2gd: {
    medium: [1, 16, 2.5979952],
    large: [2, 32, 2.5979952],
    xlarge: [4, 64, 2.5979952],
    '2xlarge': [8, 128, 2.5979952],
    '4xlarge': [16, 256, 2.5979952],
    '8xlarge': [32, 512, 2.5979952],
    '12xlarge': [48, 768, 2.5979952],
    '16xlarge': [64, 1024, 2.5979952],
    metal: [64, 1024, 2.5979952],
  },
  x2idn: {
    '16xlarge': [64, 1024, 1.0],
    '24xlarge': [96, 1546, 1.0],
    '32xlarge': [128, 2048, 1.0],
    metal: [128, 2048, 1.0],
  },
  x2iedn: {
    xlarge: [4, 128, 1.0],
    '2xlarge': [8, 256, 1.0],
    '4xlarge': [16, 512, 1.0],
    '8xlarge': [32, 1024, 1.0],
    '16xlarge': [64, 2048, 1.0],
    '24xlarge': [96, 3072, 1.0],
    '32xlarge': [128, 4096, 1.0],
    metal: [128, 4096, 1.0],
  },
  x2iezn: {
    '2xlarge': [8, 256, 1.1],
    '4xlarge': [16, 512, 1.1],
    '6xlarge': [24, 768, 1.1],
    '8xlarge': [32, 1024, 1.1],
    '12xlarge': [48, 1536, 1.1],
    metal: [48, 1536, 1.1],
  },
  z1d: {
    large: [2, 16, 1.8103792],
    xlarge: [4, 32, 1.8103792],
    '2xlarge': [8, 64, 1.8103792],
    '3xlarge': [12, 96, 1.8103792],
    '6xlarge': [24, 192, 1.8103792],
    '12xlarge': [48, 384, 1.8103792],
    metal: [48, 384, 1.8103792],
  },
  /* previous generation */
  c1: {
    medium: [2, 1.7, 1.5360594],
    xlarge: [8, 7, 1.5360594],
  },
  cr1: {
    '8xlarge': [32, 244, 1.6162132],
  },
  cc2: {
    '8xlarge': [32, 60.5, 1.5617],
  },
  c2: {
    '8xlarge': [32, 60.5, 1.56171705],
  },
  c3: {
    large: [2, 3.75, 1.3610236],
    xlarge: [4, 7.5, 1.3610236],
    '2xlarge': [8, 15, 1.3610236],
    '4xlarge': [16, 30, 1.3610236],
    '8xlarge': [32, 60, 1.3610236],
  },
  d2: {
    xlarge: [4, 30.5, 2.6162132],
    '2xlarge': [8, 61, 2.6162132],
    '4xlarge': [16, 122, 2.6162132],
    '8xlarge': [36, 244, 2.6162132],
  },
  dc2: {
    large: [2, 15, 1.8162132],
    '8xlarge': [32, 244, 1.8162132],
  },
  ds2: {
    xlarge: [4, 31, 1.8162132],
    '8xlarge': [36, 244, 1.8162132],
  },
  d3: {
    'xlarge	': [4, 32, 2.632856],
    '2xlarge': [8, 64, 2.632856],
    '4xlarge': [16, 128, 2.632856],
    '8xlarge': [32, 256, 2.632856],
  },
  d3en: {
    xlarge: [4, 16, 2.5440944],
    '2xlarge': [8, 32, 2.5440944],
    '4xlarge': [16, 64, 2.5440944],
    '6xlarge': [24, 96, 2.5440944],
    '8xlarge': [32, 128, 2.5440944],
    '12xlarge': [48, 192, 2.5440944],
  },
  dl1: {
    '24xlarge': [96, 768, 2.1429],
  },
  f1: {
    '2xlarge': [8, 122, 2.831424],
    '4xlarge': [16, 244, 2.831424],
    '16xlarge': [64, 976, 2.831424],
  },
  g2: {
    '2xlarge': [8, 15, 1.9610236],
    '8xlarge': [32, 60, 1.9610236],
  },
  g3: {
    '4xlarge': [16, 122, 2.3546168],
    '8xlarge': [32, 244, 2.3546168],
    '16xlarge': [64, 488, 2.3546168],
  },
  g3s: {
    xlarge: [4, 30.5, 2.3546168],
  },
  g4ad: {
    '4xlarge': [16, 64, 2.3103792],
    '8xlarge': [32, 128, 2.3103792],
    '16xlarge': [64, 256, 2.3103792],
  },
  g4dn: {
    xlarge: [4, 16, 3.0103792],
    '2xlarge': [8, 32, 3.0103792],
    '4xlarge': [16, 64, 3.0103792],
    '8xlarge': [32, 128, 3.0103792],
    '12xlarge': [48, 192, 3.0103792],
    '16xlarge': [64, 256, 3.0103792],
    metal: [96, 384, 3.0103792],
  },
  g5: {
    xlarge: [4, 16, 3.434],
    '2xlarge': [8, 32, 3.434],
    '4xlarge': [16, 64, 3.434],
    '8xlarge': [32, 128, 3.434],
    '12xlarge': [48, 192, 3.434],
    '16xlarge': [64, 256, 3.434],
    '24xlarge': [96, 384, 3.434],
    '48xlarge': [192, 768, 3.434],
  },
  g5g: {
    xlarge: [4, 8, 1.654],
    '2xlarge': [8, 16, 1.654],
    '4xlarge': [16, 32, 1.654],
    '8xlarge': [32, 64, 1.654],
    '16xlarge': [64, 128, 1.654],
    metal: [64, 128, 1.654],
  },
  h1: {
    '2xlarge': [8, 32, 2.632856],
    '4xlarge': [16, 64, 2.632856],
    '8xlarge': [32, 128, 2.632856],
    '16xlarge': [64, 256, 2.632856],
  },
  hs1: {
    '8xlarge': [16, 117, 2.6162132],
  },
  i2: {
    xlarge: [4, 30.5, 2.2162132],
    '2xlarge': [8, 61, 2.2162132],
    '4xlarge': [16, 122, 2.2162132],
    '8xlarge': [32, 244, 2.2162132],
  },
  i3: {
    large: [2, 15.25, 2.5879024],
    xlarge: [4, 30.5, 2.5879024],
    '2xlarge': [8, 61, 2.5879024],
    '4xlarge': [16, 122, 2.5879024],
    '8xlarge': [32, 244, 2.5879024],
    '16xlarge': [64, 488, 2.5879024],
    metal: [72, 512, 2.5879024],
  },
  i3en: {
    large: [2, 16, 2.9429488],
    xlarge: [4, 32, 2.9429488],
    '2xlarge': [8, 64, 2.9429488],
    '3xlarge': [12, 96, 2.9429488],
    '6xlarge': [24, 192, 2.9429488],
    '12xlarge': [48, 384, 2.9429488],
    '24xlarge': [96, 768, 2.9429488],
    metal: [96, 768, 2.9429488],
  },
  inf1: {
    xlarge: [4, 8, 1.3440944],
    '2xlarge': [8, 16, 1.3440944],
    '6xlarge': [24, 48, 1.3440944],
    '24xlarge': [96, 192, 1.3440944],
  },
  im4gn: {
    large: [2, 8, 1.3329],
    xlarge: [4, 16, 1.3329],
    '2xlarge': [8, 32, 1.3329],
    '4xlarge': [16, 64, 1.3329],
    '8xlarge': [32, 128, 1.3329],
    '16xlarge': [64, 256, 1.3329],
  },
  is4gen: {
    medium: [1, 6, 1.2441],
    large: [2, 12, 1.2441],
    xlarge: [4, 24, 1.2441],
    '2xlarge': [8, 48, 1.2441],
    '4xlarge': [16, 96, 1.2441],
    '8xlarge': [32, 192, 1.2441],
  },
  i4i: {
    large: [2, 16, 1.0],
    xlarge: [4, 32, 1.0],
    '2xlarge': [8, 64, 1.0],
    '4xlarge': [16, 128, 1.0],
    '8xlarge': [32, 256, 1.0],
    '16xlarge': [64, 512, 1.0],
    '32xlarge': [128, 1024, 1.0],
  },
  m1: {
    small: [1, 1.7, 1.6442376],
    medium: [1, 3.75, 1.6442376],
    large: [2, 7.5, 1.6442376],
    xlarge: [4, 15, 1.6442376],
  },
  m2: {
    xlarge: [2, 17.1, 1.6661416],
    '2xlarge': [4, 34.2, 1.6661416],
    '4xlarge': [8, 68.4, 1.6661416],
  },
  m3: {
    medium: [1, 3.75, 1.6106656],
    large: [2, 7.5, 1.6106656],
    xlarge: [4, 15, 1.6106656],
    '2xlarge': [8, 30, 1.6106656],
  },
  r3: {
    large: [2, 15.25, 1.6162132],
    xlarge: [4, 30.5, 1.6162132],
    '2xlarge': [8, 61, 1.6162132],
    '4xlarge': [16, 122, 1.6162132],
    '8xlarge': [32, 244, 1.6162132],
  },
  t1: {
    micro: [1, 613, 1.2775232],
  },
  vt1: {
    '3xlarge': [12, 24, 1.3441],
    '6xlarge': [24, 48, 1.3441],
    '24xlarge': [96, 192, 1.3441],
  },
}

export const INSTANCE_FAMILY_TO_INSTANCE_TYPE_MAPPING: {
  [instanceFamily: string]: { [instanceSize: string]: number[] } // [vcpus, memory, scope3 emissions ]
} = {
  'u-3tb1': {
    '56xlarge': [224, 3072, 1.1],
  },
  'u-6tb1': {
    '56xlarge': [224, 6144, 1.1],
    '112xlarge': [448, 6144, 1.1],
    metal: [448, 6144, 35.762264],
  },
  'u-9tb1': {
    '112xlarge': [448, 9216, 1.1],
    metal: [448, 9216, 35.762264],
  },
  'u-12tb1': {
    '112xlarge': [448, 12288, 1.1],
    metal: [448, 12288, 35.762264],
  },
  'u-18tb1': {
    metal: [448, 18432, 35.762264],
  },
  'u-24tb1': {
    metal: [448, 24576, 35.762264],
  },
}

export const BURSTABLE_INSTANCE_BASELINE_UTILIZATION: {
  [instanceType: string]: number
} = {
  't2.nano': 5,
  't2.micro': 10,
  't2.small': 20,
  't2.medium': 20,
  't2.large': 30,
  't2.xlarge': 22.5,
  't2.2xlarge': 17,
  't3.nano': 5,
  't3.micro': 10,
  't3.small': 20,
  't3.medium': 20,
  't3.large': 30,
  't3.xlarge': 40,
  't3.2xlarge': 40,
  't3a.nano': 5,
  't3a.micro': 10,
  't3a.small': 20,
  't3a.medium': 20,
  't3a.large': 30,
  't3a.xlarge': 40,
  't3a.2xlarge': 40,
  't4g.nano': 5,
  't4g.micro': 10,
  't4g.small': 20,
  't4g.medium': 20,
  't4g.large': 30,
  't4g.xlarge': 40,
  't4g.2xlarge': 40,
}

export const INSTANCE_TYPE_COMPUTE_PROCESSOR_MAPPING: {
  [instanceType: string]: string[]
} = {
  'mac1.metal': [COMPUTE_PROCESSOR_TYPES.COFFEE_LAKE],
  't4g.nano': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON_2],
  't4g.micro': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON_2],
  't4g.small': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON_2],
  't4g.medium': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON_2],
  't4g.large': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON_2],
  't4g.xlarge': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON_2],
  't4g.2xlarge': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON_2],
  't3.nano': [COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE],
  't3.micro': [COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE],
  't3.small': [COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE],
  't3.medium': [COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE],
  't3.large': [COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE],
  't3.xlarge': [COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE],
  't3.2xlarge': [COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE],
  't3a.nano': [COMPUTE_PROCESSOR_TYPES.AMD_EPYC_1ST_GEN],
  't3a.micro': [COMPUTE_PROCESSOR_TYPES.AMD_EPYC_1ST_GEN],
  't3a.small': [COMPUTE_PROCESSOR_TYPES.AMD_EPYC_1ST_GEN],
  't3a.medium': [COMPUTE_PROCESSOR_TYPES.AMD_EPYC_1ST_GEN],
  't3a.large': [COMPUTE_PROCESSOR_TYPES.AMD_EPYC_1ST_GEN],
  't3a.xlarge': [COMPUTE_PROCESSOR_TYPES.AMD_EPYC_1ST_GEN],
  't3a.2xlarge': [COMPUTE_PROCESSOR_TYPES.AMD_EPYC_1ST_GEN],
  't2.nano': [COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE],
  't2.micro': [COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE],
  't2.small': [COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE],
  't2.medium': [COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE],
  't2.large': [COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE],
  't2.xlarge': [COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE],
  't2.2xlarge': [COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE],
  'm6g.medium': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON_2],
  'm6g.large': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON_2],
  'm6g.xlarge': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON_2],
  'm6g.2xlarge': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON_2],
  'm6g.4xlarge': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON_2],
  'm6g.8xlarge': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON_2],
  'm6g.12xlarge': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON_2],
  'm6g.16xlarge': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON_2],
  'm6g.metal': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON_2],
  'm6gd.medium': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON_2],
  'm6gd.large': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON_2],
  'm6gd.xlarge': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON_2],
  'm6gd.2xlarge': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON_2],
  'm6gd.4xlarge': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON_2],
  'm6gd.8xlarge': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON_2],
  'm6gd.12xlarge': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON_2],
  'm6gd.16xlarge': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON_2],
  'm6gd.metal': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON_2],
  'm5.large': [COMPUTE_PROCESSOR_TYPES.SKYLAKE],
  'm5.xlarge': [COMPUTE_PROCESSOR_TYPES.SKYLAKE],
  'm5.2xlarge': [COMPUTE_PROCESSOR_TYPES.SKYLAKE],
  'm5.4xlarge': [COMPUTE_PROCESSOR_TYPES.SKYLAKE],
  'm5.8xlarge': [COMPUTE_PROCESSOR_TYPES.SKYLAKE],
  'm5.12xlarge': [COMPUTE_PROCESSOR_TYPES.SKYLAKE],
  'm5.16xlarge': [COMPUTE_PROCESSOR_TYPES.SKYLAKE],
  'm5.24xlarge': [COMPUTE_PROCESSOR_TYPES.SKYLAKE],
  'm5.metal': [COMPUTE_PROCESSOR_TYPES.SKYLAKE],
  'm5d.large': [COMPUTE_PROCESSOR_TYPES.SKYLAKE],
  'm5d.xlarge': [COMPUTE_PROCESSOR_TYPES.SKYLAKE],
  'm5d.2xlarge': [COMPUTE_PROCESSOR_TYPES.SKYLAKE],
  'm5d.4xlarge': [COMPUTE_PROCESSOR_TYPES.SKYLAKE],
  'm5d.8xlarge': [COMPUTE_PROCESSOR_TYPES.SKYLAKE],
  'm5d.12xlarge': [COMPUTE_PROCESSOR_TYPES.SKYLAKE],
  'm5d.16xlarge': [COMPUTE_PROCESSOR_TYPES.SKYLAKE],
  'm5d.24xlarge': [COMPUTE_PROCESSOR_TYPES.SKYLAKE],
  'm5d.metal': [COMPUTE_PROCESSOR_TYPES.SKYLAKE],
  'm5a.large': [COMPUTE_PROCESSOR_TYPES.AMD_EPYC_1ST_GEN],
  'm5a.xlarge': [COMPUTE_PROCESSOR_TYPES.AMD_EPYC_1ST_GEN],
  'm5a.2xlarge': [COMPUTE_PROCESSOR_TYPES.AMD_EPYC_1ST_GEN],
  'm5a.4xlarge': [COMPUTE_PROCESSOR_TYPES.AMD_EPYC_1ST_GEN],
  'm5a.8xlarge': [COMPUTE_PROCESSOR_TYPES.AMD_EPYC_1ST_GEN],
  'm5a.12xlarge': [COMPUTE_PROCESSOR_TYPES.AMD_EPYC_1ST_GEN],
  'm5a.16xlarge': [COMPUTE_PROCESSOR_TYPES.AMD_EPYC_1ST_GEN],
  'm5a.24xlarge': [COMPUTE_PROCESSOR_TYPES.AMD_EPYC_1ST_GEN],
  'm5ad.large': [COMPUTE_PROCESSOR_TYPES.AMD_EPYC_1ST_GEN],
  'm5ad.xlarge': [COMPUTE_PROCESSOR_TYPES.AMD_EPYC_1ST_GEN],
  'm5ad.2xlarge': [COMPUTE_PROCESSOR_TYPES.AMD_EPYC_1ST_GEN],
  'm5ad.4xlarge': [COMPUTE_PROCESSOR_TYPES.AMD_EPYC_1ST_GEN],
  'm5ad.8xlarge': [COMPUTE_PROCESSOR_TYPES.AMD_EPYC_1ST_GEN],
  'm5ad.12xlarge': [COMPUTE_PROCESSOR_TYPES.AMD_EPYC_1ST_GEN],
  'm5ad.16xlarge': [COMPUTE_PROCESSOR_TYPES.AMD_EPYC_1ST_GEN],
  'm5ad.24xlarge': [COMPUTE_PROCESSOR_TYPES.AMD_EPYC_1ST_GEN],
  'm5n.large': [COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE],
  'm5n.xlarge': [COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE],
  'm5n.2xlarge': [COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE],
  'm5n.4xlarge': [COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE],
  'm5n.8xlarge': [COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE],
  'm5n.12xlarge': [COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE],
  'm5n.16xlarge': [COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE],
  'm5n.24xlarge': [COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE],
  'm5n.metal': [COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE],
  'm5dn.large': [COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE],
  'm5dn.xlarge': [COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE],
  'm5dn.2xlarge': [COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE],
  'm5dn.4xlarge': [COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE],
  'm5dn.8xlarge': [COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE],
  'm5dn.12xlarge': [COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE],
  'm5dn.16xlarge': [COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE],
  'm5dn.24xlarge': [COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE],
  'm5dn.metal': [COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE],
  'm5zn.large': [COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE],
  'm5zn.xlarge': [COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE],
  'm5zn.2xlarge': [COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE],
  'm5zn.3xlarge': [COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE],
  'm5zn.6xlarge': [COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE],
  'm5zn.12xlarge': [COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE],
  'm5zn.metal': [COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE],
  'm4.large': broadwellHaswell,
  'm4.xlarge': broadwellHaswell,
  'm4.2xlarge': broadwellHaswell,
  'm4.4xlarge': broadwellHaswell,
  'm4.10xlarge': broadwellHaswell,
  'm4.16xlarge': broadwellHaswell,
  'a1.medium': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON],
  'a1.large': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON],
  'a1.xlarge': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON],
  'a1.2xlarge': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON],
  'a1.4xlarge': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON],
  'a1.metal': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON],
  'c5.large': cascadeLakeSkylake,
  'c5.xlarge': cascadeLakeSkylake,
  'c5.2xlarge': cascadeLakeSkylake,
  'c5.4xlarge': cascadeLakeSkylake,
  'c5.9xlarge': cascadeLakeSkylake,
  'c5.12xlarge': [COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE],
  'c5.18xlarge': cascadeLakeSkylake,
  'c5.24xlarge': [COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE],
  'c5.metal': cascadeLakeSkylake,
  'c5d.large': cascadeLakeSkylake,
  'c5d.xlarge': cascadeLakeSkylake,
  'c5d.2xlarge': cascadeLakeSkylake,
  'c5d.4xlarge': cascadeLakeSkylake,
  'c5d.9xlarge': cascadeLakeSkylake,
  'c5d.12xlarge': [COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE],
  'c5d.18xlarge': cascadeLakeSkylake,
  'c5d.24xlarge': [COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE],
  'c5d.metal': cascadeLakeSkylake,
  'c5n.large': cascadeLakeSkylake,
  'c5n.xlarge': cascadeLakeSkylake,
  'c5n.2xlarge': cascadeLakeSkylake,
  'c5n.4xlarge': cascadeLakeSkylake,
  'c5n.9xlarge': cascadeLakeSkylake,
  'c5n.18xlarge': cascadeLakeSkylake,
  'c5n.metal': cascadeLakeSkylake,
  'c5a.large': [COMPUTE_PROCESSOR_TYPES.AMD_EPYC_2ND_GEN],
  'c5a.xlarge': [COMPUTE_PROCESSOR_TYPES.AMD_EPYC_2ND_GEN],
  'c5a.2xlarge': [COMPUTE_PROCESSOR_TYPES.AMD_EPYC_2ND_GEN],
  'c5a.4xlarge': [COMPUTE_PROCESSOR_TYPES.AMD_EPYC_2ND_GEN],
  'c5a.8xlarge': [COMPUTE_PROCESSOR_TYPES.AMD_EPYC_2ND_GEN],
  'c5a.12xlarge': [COMPUTE_PROCESSOR_TYPES.AMD_EPYC_2ND_GEN],
  'c5a.16xlarge': [COMPUTE_PROCESSOR_TYPES.AMD_EPYC_2ND_GEN],
  'c5a.24xlarge': [COMPUTE_PROCESSOR_TYPES.AMD_EPYC_2ND_GEN],
  'c5ad.large': [COMPUTE_PROCESSOR_TYPES.AMD_EPYC_2ND_GEN],
  'c5ad.xlarge': [COMPUTE_PROCESSOR_TYPES.AMD_EPYC_2ND_GEN],
  'c5ad.2xlarge': [COMPUTE_PROCESSOR_TYPES.AMD_EPYC_2ND_GEN],
  'c5ad.4xlarge': [COMPUTE_PROCESSOR_TYPES.AMD_EPYC_2ND_GEN],
  'c5ad.8xlarge': [COMPUTE_PROCESSOR_TYPES.AMD_EPYC_2ND_GEN],
  'c5ad.12xlarge': [COMPUTE_PROCESSOR_TYPES.AMD_EPYC_2ND_GEN],
  'c5ad.16xlarge': [COMPUTE_PROCESSOR_TYPES.AMD_EPYC_2ND_GEN],
  'c5ad.24xlarge': [COMPUTE_PROCESSOR_TYPES.AMD_EPYC_2ND_GEN],
  'c4.large': [COMPUTE_PROCESSOR_TYPES.HASWELL],
  'c4.xlarge': [COMPUTE_PROCESSOR_TYPES.HASWELL],
  'c4.2xlarge': [COMPUTE_PROCESSOR_TYPES.HASWELL],
  'c4.4xlarge': [COMPUTE_PROCESSOR_TYPES.HASWELL],
  'c4.8xlarge': [COMPUTE_PROCESSOR_TYPES.HASWELL],
  'c6g.medium': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON_2],
  'c6g.large': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON_2],
  'c6g.xlarge': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON_2],
  'c6g.2xlarge': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON_2],
  'c6g.4xlarge': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON_2],
  'c6g.8xlarge': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON_2],
  'c6g.12xlarge': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON_2],
  'c6g.16xlarge': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON_2],
  'c6g.metal': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON_2],
  'c6gd.medium': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON_2],
  'c6gd.large': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON_2],
  'c6gd.xlarge': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON_2],
  'c6gd.2xlarge': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON_2],
  'c6gd.4xlarge': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON_2],
  'c6gd.8xlarge': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON_2],
  'c6gd.12xlarge': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON_2],
  'c6gd.16xlarge': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON_2],
  'c6gd.metal': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON_2],
  'r6g.medium': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON_2],
  'r6g.large': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON_2],
  'r6g.xlarge': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON_2],
  'r6g.2xlarge': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON_2],
  'r6g.4xlarge': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON_2],
  'r6g.8xlarge': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON_2],
  'r6g.12xlarge': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON_2],
  'r6g.16xlarge': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON_2],
  'r6g.metal': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON_2],
  'r6gd.medium': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON_2],
  'r6gd.large': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON_2],
  'r6gd.xlarge': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON_2],
  'r6gd.2xlarge': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON_2],
  'r6gd.4xlarge': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON_2],
  'r6gd.8xlarge': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON_2],
  'r6gd.12xlarge': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON_2],
  'r6gd.16xlarge': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON_2],
  'r6gd.metal': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON_2],
  'r5.large': cascadeLakeSkylake,
  'r5.xlarge': cascadeLakeSkylake,
  'r5.2xlarge': cascadeLakeSkylake,
  'r5.4xlarge': cascadeLakeSkylake,
  'r5.8xlarge': cascadeLakeSkylake,
  'r5.12xlarge': cascadeLakeSkylake,
  'r5.16xlarge': cascadeLakeSkylake,
  'r5.24xlarge': cascadeLakeSkylake,
  'r5.metal': cascadeLakeSkylake,
  'r5d.large': cascadeLakeSkylake,
  'r5d.xlarge': cascadeLakeSkylake,
  'r5d.2xlarge': cascadeLakeSkylake,
  'r5d.4xlarge': cascadeLakeSkylake,
  'r5d.8xlarge': cascadeLakeSkylake,
  'r5d.12xlarge': cascadeLakeSkylake,
  'r5d.16xlarge': cascadeLakeSkylake,
  'r5d.24xlarge': cascadeLakeSkylake,
  'r5d.metal': cascadeLakeSkylake,
  'r5a.large': [COMPUTE_PROCESSOR_TYPES.AMD_EPYC_1ST_GEN],
  'r5a.xlarge': [COMPUTE_PROCESSOR_TYPES.AMD_EPYC_1ST_GEN],
  'r5a.2xlarge': [COMPUTE_PROCESSOR_TYPES.AMD_EPYC_1ST_GEN],
  'r5a.4xlarge': [COMPUTE_PROCESSOR_TYPES.AMD_EPYC_1ST_GEN],
  'r5a.8xlarge': [COMPUTE_PROCESSOR_TYPES.AMD_EPYC_1ST_GEN],
  'r5a.12xlarge': [COMPUTE_PROCESSOR_TYPES.AMD_EPYC_1ST_GEN],
  'r5a.16xlarge': [COMPUTE_PROCESSOR_TYPES.AMD_EPYC_1ST_GEN],
  'r5a.24xlarge': [COMPUTE_PROCESSOR_TYPES.AMD_EPYC_1ST_GEN],
  'r5ad.large': [COMPUTE_PROCESSOR_TYPES.AMD_EPYC_1ST_GEN],
  'r5ad.xlarge': [COMPUTE_PROCESSOR_TYPES.AMD_EPYC_1ST_GEN],
  'r5ad.2xlarge': [COMPUTE_PROCESSOR_TYPES.AMD_EPYC_1ST_GEN],
  'r5ad.4xlarge': [COMPUTE_PROCESSOR_TYPES.AMD_EPYC_1ST_GEN],
  'r5ad.8xlarge': [COMPUTE_PROCESSOR_TYPES.AMD_EPYC_1ST_GEN],
  'r5ad.12xlarge': [COMPUTE_PROCESSOR_TYPES.AMD_EPYC_1ST_GEN],
  'r5ad.16xlarge': [COMPUTE_PROCESSOR_TYPES.AMD_EPYC_1ST_GEN],
  'r5ad.24xlarge': [COMPUTE_PROCESSOR_TYPES.AMD_EPYC_1ST_GEN],
  'r5n.large': [COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE],
  'r5n.xlarge': [COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE],
  'r5n.2xlarge': [COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE],
  'r5n.4xlarge': [COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE],
  'r5n.8xlarge': [COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE],
  'r5n.12xlarge': [COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE],
  'r5n.16xlarge': [COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE],
  'r5n.24xlarge': [COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE],
  'r5n.metal': [COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE],
  'r5dn.large': [COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE],
  'r5dn.xlarge': [COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE],
  'r5dn.2xlarge': [COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE],
  'r5dn.4xlarge': [COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE],
  'r5dn.8xlarge': [COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE],
  'r5dn.12xlarge': [COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE],
  'r5dn.16xlarge': [COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE],
  'r5dn.24xlarge': [COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE],
  'r5dn.metal': [COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE],
  'r4.large': [COMPUTE_PROCESSOR_TYPES.BROADWELL],
  'r4.xlarge': [COMPUTE_PROCESSOR_TYPES.BROADWELL],
  'r4.2xlarge': [COMPUTE_PROCESSOR_TYPES.BROADWELL],
  'r4.4xlarge': [COMPUTE_PROCESSOR_TYPES.BROADWELL],
  'r4.8xlarge': [COMPUTE_PROCESSOR_TYPES.BROADWELL],
  'r4.16xlarge': [COMPUTE_PROCESSOR_TYPES.BROADWELL],
  'x1e.xlarge': [COMPUTE_PROCESSOR_TYPES.HASWELL],
  'x1e.2xlarge': [COMPUTE_PROCESSOR_TYPES.HASWELL],
  'x1e.4xlarge': [COMPUTE_PROCESSOR_TYPES.HASWELL],
  'x1e.8xlarge': [COMPUTE_PROCESSOR_TYPES.HASWELL],
  'x1e.16xlarge': [COMPUTE_PROCESSOR_TYPES.HASWELL],
  'x1e.32xlarge': [COMPUTE_PROCESSOR_TYPES.HASWELL],
  'x1.16xlarge': [COMPUTE_PROCESSOR_TYPES.HASWELL],
  'x1.32xlarge': [COMPUTE_PROCESSOR_TYPES.HASWELL],
  'z1d.large': [COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE],
  'z1d.xlarge': [COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE],
  'z1d.2xlarge': [COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE],
  'z1d.3xlarge': [COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE],
  'z1d.6xlarge': [COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE],
  'z1d.12xlarge': [COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE],
  'z1d.metal': [COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE],
  'r5b.large': [COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE],
  'r5b.xlarge': [COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE],
  'r5b.2xlarge': [COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE],
  'r5b.4xlarge': [COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE],
  'r5b.8xlarge': [COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE],
  'r5b.12xlarge': [COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE],
  'r5b.16xlarge': [COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE],
  'r5b.24xlarge': [COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE],
  'r5b.metal': [COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE],
  'd2.xlarge': [COMPUTE_PROCESSOR_TYPES.HASWELL],
  'd2.2xlarge': [COMPUTE_PROCESSOR_TYPES.HASWELL],
  'd2.4xlarge': [COMPUTE_PROCESSOR_TYPES.HASWELL],
  'd2.8xlarge': [COMPUTE_PROCESSOR_TYPES.HASWELL],
  'm1.small': [COMPUTE_PROCESSOR_TYPES.UNKNOWN],
  'm1.medium': [COMPUTE_PROCESSOR_TYPES.UNKNOWN],
  'm1.large': [COMPUTE_PROCESSOR_TYPES.UNKNOWN],
  'm1.xlarge': [COMPUTE_PROCESSOR_TYPES.UNKNOWN],
  'm3.medium': [COMPUTE_PROCESSOR_TYPES.UNKNOWN],
  'm3.large': [COMPUTE_PROCESSOR_TYPES.UNKNOWN],
  'm3.xlarge': [COMPUTE_PROCESSOR_TYPES.UNKNOWN],
  'm3.2xlarge': [COMPUTE_PROCESSOR_TYPES.UNKNOWN],
  'c1.medium': [COMPUTE_PROCESSOR_TYPES.UNKNOWN],
  'c1.xlarge': [COMPUTE_PROCESSOR_TYPES.UNKNOWN],
  'c2.8xlarge': [COMPUTE_PROCESSOR_TYPES.UNKNOWN],
  'c3.large': [COMPUTE_PROCESSOR_TYPES.UNKNOWN],
  'c3.xlarge': [COMPUTE_PROCESSOR_TYPES.UNKNOWN],
  'c3.2xlarge': [COMPUTE_PROCESSOR_TYPES.UNKNOWN],
  'c3.4xlarge': [COMPUTE_PROCESSOR_TYPES.UNKNOWN],
  'c3.8xlarge': [COMPUTE_PROCESSOR_TYPES.UNKNOWN],
  'm2.xlarge': [COMPUTE_PROCESSOR_TYPES.UNKNOWN],
  'm2.2xlarge': [COMPUTE_PROCESSOR_TYPES.UNKNOWN],
  'm2.4xlarge': [COMPUTE_PROCESSOR_TYPES.UNKNOWN],
  'cr1.8xlarge': [COMPUTE_PROCESSOR_TYPES.UNKNOWN],
  'cc2.8xlarge': [COMPUTE_PROCESSOR_TYPES.UNKNOWN],
  'r3.large': [COMPUTE_PROCESSOR_TYPES.UNKNOWN],
  'r3.xlarge': [COMPUTE_PROCESSOR_TYPES.UNKNOWN],
  'r3.2xlarge': [COMPUTE_PROCESSOR_TYPES.UNKNOWN],
  'r3.4xlarge': [COMPUTE_PROCESSOR_TYPES.UNKNOWN],
  'r3.8xlarge': [COMPUTE_PROCESSOR_TYPES.UNKNOWN],
  'i2.xlarge': [COMPUTE_PROCESSOR_TYPES.UNKNOWN],
  'i2.2xlarge': [COMPUTE_PROCESSOR_TYPES.UNKNOWN],
  'i2.4xlarge': [COMPUTE_PROCESSOR_TYPES.UNKNOWN],
  'i2.8xlarge': [COMPUTE_PROCESSOR_TYPES.UNKNOWN],
  'i3.large': [COMPUTE_PROCESSOR_TYPES.UNKNOWN],
  'i3.xlarge': [COMPUTE_PROCESSOR_TYPES.UNKNOWN],
  'i3.2xlarge': [COMPUTE_PROCESSOR_TYPES.UNKNOWN],
  'i3.4xlarge': [COMPUTE_PROCESSOR_TYPES.UNKNOWN],
  'i3.8xlarge': [COMPUTE_PROCESSOR_TYPES.UNKNOWN],
  'i3.16xlarge': [COMPUTE_PROCESSOR_TYPES.UNKNOWN],
  'i3.metal': [COMPUTE_PROCESSOR_TYPES.UNKNOWN],
  'i3en.large': cascadeLakeSkylake,
  'i3en.xlarge': cascadeLakeSkylake,
  'i3en.2xlarge': cascadeLakeSkylake,
  'i3en.3xlarge': cascadeLakeSkylake,
  'i3en.6xlarge': cascadeLakeSkylake,
  'i3en.12xlarge': cascadeLakeSkylake,
  'i3en.24xlarge': cascadeLakeSkylake,
  'i3en.metal': cascadeLakeSkylake,
  'h1.2xlarge': [COMPUTE_PROCESSOR_TYPES.BROADWELL],
  'h1.4xlarge': [COMPUTE_PROCESSOR_TYPES.BROADWELL],
  'h1.8xlarge': [COMPUTE_PROCESSOR_TYPES.BROADWELL],
  'h1.16xlarge': [COMPUTE_PROCESSOR_TYPES.BROADWELL],
  'hs1.8xlarge': [COMPUTE_PROCESSOR_TYPES.UNKNOWN],
  't1.micro': [COMPUTE_PROCESSOR_TYPES.UNKNOWN],
  'dc2.large': [COMPUTE_PROCESSOR_TYPES.UNKNOWN],
  'dc2.8xlarge': [COMPUTE_PROCESSOR_TYPES.UNKNOWN],
  'ra3.xlplus': [COMPUTE_PROCESSOR_TYPES.UNKNOWN],
  'ra3.4xlarge': [COMPUTE_PROCESSOR_TYPES.UNKNOWN],
  'ra3.16xlarge': [COMPUTE_PROCESSOR_TYPES.UNKNOWN],
  'dc1.large': [COMPUTE_PROCESSOR_TYPES.UNKNOWN],
  'dc1.8xlarge': [COMPUTE_PROCESSOR_TYPES.UNKNOWN],
  'ds2.xlarge': [COMPUTE_PROCESSOR_TYPES.UNKNOWN],
  'ds2.8xlarge': [COMPUTE_PROCESSOR_TYPES.UNKNOWN],
  'inf1.xlarge': [COMPUTE_PROCESSOR_TYPES.UNKNOWN],
  'inf1.2xlarge': [COMPUTE_PROCESSOR_TYPES.UNKNOWN],
  'inf1.6xlarge': [COMPUTE_PROCESSOR_TYPES.UNKNOWN],
  'inf1.24xlarge': [COMPUTE_PROCESSOR_TYPES.UNKNOWN],
  'f1.2xlarge': [COMPUTE_PROCESSOR_TYPES.BROADWELL],
  'f1.4xlarge': [COMPUTE_PROCESSOR_TYPES.BROADWELL],
  'f1.16xlarge': [COMPUTE_PROCESSOR_TYPES.BROADWELL],
  // Instances with GPUs
  'p2.xlarge': [COMPUTE_PROCESSOR_TYPES.BROADWELL],
  'p2.8xlarge': [COMPUTE_PROCESSOR_TYPES.BROADWELL],
  'p2.16xlarge': [COMPUTE_PROCESSOR_TYPES.BROADWELL],
  'p3.2xlarge': [COMPUTE_PROCESSOR_TYPES.BROADWELL],
  'p3.8xlarge': [COMPUTE_PROCESSOR_TYPES.BROADWELL],
  'p3.16xlarge': [COMPUTE_PROCESSOR_TYPES.BROADWELL],
  'p3dn.24xlarge': [COMPUTE_PROCESSOR_TYPES.SKYLAKE],
  'p4d.24xlarge': [COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE],
  'g2.2xlarge': [COMPUTE_PROCESSOR_TYPES.IVY_BRIDGE],
  'g2.8xlarge': [COMPUTE_PROCESSOR_TYPES.IVY_BRIDGE],
  'g3s.xlarge': [COMPUTE_PROCESSOR_TYPES.BROADWELL],
  'g3.4xlarge': [COMPUTE_PROCESSOR_TYPES.BROADWELL],
  'g3.8xlarge': [COMPUTE_PROCESSOR_TYPES.BROADWELL],
  'g3.16xlarge': [COMPUTE_PROCESSOR_TYPES.BROADWELL],
  'g4dn.xlarge': [COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE],
  'g4dn.2xlarge': [COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE],
  'g4dn.4xlarge': [COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE],
  'g4dn.8xlarge': [COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE],
  'g4dn.16xlarge': [COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE],
  'g4dn.12xlarge': [COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE],
  'g4dn.metal': [COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE],
  'g4ad.4xlarge': [COMPUTE_PROCESSOR_TYPES.AMD_EPYC_2ND_GEN],
  'g4ad.8xlarge': [COMPUTE_PROCESSOR_TYPES.AMD_EPYC_2ND_GEN],
  'g4ad.16xlarge': [COMPUTE_PROCESSOR_TYPES.AMD_EPYC_2ND_GEN],
  'g5.xlarge': [COMPUTE_PROCESSOR_TYPES.AMD_EPYC_2ND_GEN],
  'g5.2xlarge': [COMPUTE_PROCESSOR_TYPES.AMD_EPYC_2ND_GEN],
  'g5.4xlarge': [COMPUTE_PROCESSOR_TYPES.AMD_EPYC_2ND_GEN],
  'g5.8xlarge': [COMPUTE_PROCESSOR_TYPES.AMD_EPYC_2ND_GEN],
  'g5.16xlarge': [COMPUTE_PROCESSOR_TYPES.AMD_EPYC_2ND_GEN],
  'g5.12xlarge': [COMPUTE_PROCESSOR_TYPES.AMD_EPYC_2ND_GEN],
  'g5.24xlarge': [COMPUTE_PROCESSOR_TYPES.AMD_EPYC_2ND_GEN],
  'g5.48xlarge': [COMPUTE_PROCESSOR_TYPES.AMD_EPYC_2ND_GEN],
  'g5g.xlarge': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON_2],
  'g5g.2xlarge': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON_2],
  'g5g.4xlarge': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON_2],
  'g5g.8xlarge': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON_2],
  'g5g.16xlarge': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON_2],
  'g5g.metal': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON_2],
  'c6gn.medium': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON_2],
  'c6gn.large': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON_2],
  'c6gn.xlarge': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON_2],
  'c6gn.2xlarge': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON_2],
  'c6gn.4xlarge': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON_2],
  'c6gn.8xlarge': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON_2],
  'c6gn.12xlarge': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON_2],
  'c6gn.16xlarge': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON_2],
  'd3.xlarge': [COMPUTE_PROCESSOR_TYPES.UNKNOWN],
  'd3.2xlarge': [COMPUTE_PROCESSOR_TYPES.UNKNOWN],
  'd3.4xlarge': [COMPUTE_PROCESSOR_TYPES.UNKNOWN],
  'd3.8xlarge': [COMPUTE_PROCESSOR_TYPES.UNKNOWN],
  'd3en.xlarge': [COMPUTE_PROCESSOR_TYPES.UNKNOWN],
  'd3en.2xlarge': [COMPUTE_PROCESSOR_TYPES.UNKNOWN],
  'd3en.4xlarge': [COMPUTE_PROCESSOR_TYPES.UNKNOWN],
  'd3en.6xlarge': [COMPUTE_PROCESSOR_TYPES.UNKNOWN],
  'd3en.8xlarge': [COMPUTE_PROCESSOR_TYPES.UNKNOWN],
  'd3en.12xlarge': [COMPUTE_PROCESSOR_TYPES.UNKNOWN],
  'm6i.large': [COMPUTE_PROCESSOR_TYPES.UNKNOWN],
  'm6i.xlarge': [COMPUTE_PROCESSOR_TYPES.UNKNOWN],
  'm6i.2xlarge': [COMPUTE_PROCESSOR_TYPES.UNKNOWN],
  'm6i.4xlarge': [COMPUTE_PROCESSOR_TYPES.UNKNOWN],
  'm6i.8xlarge': [COMPUTE_PROCESSOR_TYPES.UNKNOWN],
  'm6i.12xlarge': [COMPUTE_PROCESSOR_TYPES.UNKNOWN],
  'm6i.16xlarge': [COMPUTE_PROCESSOR_TYPES.UNKNOWN],
  'm6i.24xlarge': [COMPUTE_PROCESSOR_TYPES.UNKNOWN],
  'm6i.32xlarge': [COMPUTE_PROCESSOR_TYPES.UNKNOWN],
  'u-6tb1.metal': [COMPUTE_PROCESSOR_TYPES.UNKNOWN],
  'u-9tb1.metal': [COMPUTE_PROCESSOR_TYPES.UNKNOWN],
  'u-12tb1.metal': [COMPUTE_PROCESSOR_TYPES.UNKNOWN],
  'u-18tb1.metal': [COMPUTE_PROCESSOR_TYPES.UNKNOWN],
  'u-24tb1.metal': [COMPUTE_PROCESSOR_TYPES.UNKNOWN],
  'x2gd.medium': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON_2],
  'x2gd.large': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON_2],
  'x2gd.xlarge': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON_2],
  'x2gd.2xlarge': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON_2],
  'x2gd.4xlarge': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON_2],
  'x2gd.8xlarge': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON_2],
  'x2gd.12xlarge': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON_2],
  'x2gd.16xlarge': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON_2],
  'x2gd.metal': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON_2],
  'm6a.large': [COMPUTE_PROCESSOR_TYPES.AMD_EPYC_3RD_GEN],
  'm6a.xlarge': [COMPUTE_PROCESSOR_TYPES.AMD_EPYC_3RD_GEN],
  'm6a.2xlarge': [COMPUTE_PROCESSOR_TYPES.AMD_EPYC_3RD_GEN],
  'm6a.4xlarge': [COMPUTE_PROCESSOR_TYPES.AMD_EPYC_3RD_GEN],
  'm6a.8xlarge': [COMPUTE_PROCESSOR_TYPES.AMD_EPYC_3RD_GEN],
  'm6a.12xlarge': [COMPUTE_PROCESSOR_TYPES.AMD_EPYC_3RD_GEN],
  'm6a.16xlarge': [COMPUTE_PROCESSOR_TYPES.AMD_EPYC_3RD_GEN],
  'm6a.24xlarge': [COMPUTE_PROCESSOR_TYPES.AMD_EPYC_3RD_GEN],
  'm6a.32xlarge': [COMPUTE_PROCESSOR_TYPES.AMD_EPYC_3RD_GEN],
  'm6a.48xlarge': [COMPUTE_PROCESSOR_TYPES.AMD_EPYC_3RD_GEN],
  'c6i.large': [COMPUTE_PROCESSOR_TYPES.ICELAKE],
  'c6i.xlarge': [COMPUTE_PROCESSOR_TYPES.ICELAKE],
  'c6i.2xlarge': [COMPUTE_PROCESSOR_TYPES.ICELAKE],
  'c6i.4xlarge': [COMPUTE_PROCESSOR_TYPES.ICELAKE],
  'c6i.8xlarge': [COMPUTE_PROCESSOR_TYPES.ICELAKE],
  'c6i.12xlarge': [COMPUTE_PROCESSOR_TYPES.ICELAKE],
  'c6i.16xlarge': [COMPUTE_PROCESSOR_TYPES.ICELAKE],
  'c6i.24xlarge': [COMPUTE_PROCESSOR_TYPES.ICELAKE],
  'c6i.32xlarge': [COMPUTE_PROCESSOR_TYPES.ICELAKE],
  'c6i.metal': [COMPUTE_PROCESSOR_TYPES.ICELAKE],
  'c6a.large': [COMPUTE_PROCESSOR_TYPES.AMD_EPYC_3RD_GEN],
  'c6a.xlarge': [COMPUTE_PROCESSOR_TYPES.AMD_EPYC_3RD_GEN],
  'c6a.2xlarge': [COMPUTE_PROCESSOR_TYPES.AMD_EPYC_3RD_GEN],
  'c6a.4xlarge': [COMPUTE_PROCESSOR_TYPES.AMD_EPYC_3RD_GEN],
  'c6a.8xlarge': [COMPUTE_PROCESSOR_TYPES.AMD_EPYC_3RD_GEN],
  'c6a.12xlarge': [COMPUTE_PROCESSOR_TYPES.AMD_EPYC_3RD_GEN],
  'c6a.16xlarge': [COMPUTE_PROCESSOR_TYPES.AMD_EPYC_3RD_GEN],
  'c6a.24xlarge': [COMPUTE_PROCESSOR_TYPES.AMD_EPYC_3RD_GEN],
  'c6a.32xlarge': [COMPUTE_PROCESSOR_TYPES.AMD_EPYC_3RD_GEN],
  'c6a.48xlarge': [COMPUTE_PROCESSOR_TYPES.AMD_EPYC_3RD_GEN],
  'Hpc6a.48xlarge': [COMPUTE_PROCESSOR_TYPES.AMD_EPYC_3RD_GEN],
  'r6i.large': [COMPUTE_PROCESSOR_TYPES.ICELAKE],
  'r6i.xlarge': [COMPUTE_PROCESSOR_TYPES.ICELAKE],
  'r6i.2xlarge': [COMPUTE_PROCESSOR_TYPES.ICELAKE],
  'r6i.4xlarge': [COMPUTE_PROCESSOR_TYPES.ICELAKE],
  'r6i.8xlarge': [COMPUTE_PROCESSOR_TYPES.ICELAKE],
  'r6i.12xlarge': [COMPUTE_PROCESSOR_TYPES.ICELAKE],
  'r6i.16xlarge': [COMPUTE_PROCESSOR_TYPES.ICELAKE],
  'r6i.24xlarge': [COMPUTE_PROCESSOR_TYPES.ICELAKE],
  'r6i.32xlarge': [COMPUTE_PROCESSOR_TYPES.ICELAKE],
  'r6i.metal': [COMPUTE_PROCESSOR_TYPES.ICELAKE],
  'x2idn.16xlarge': [COMPUTE_PROCESSOR_TYPES.ICELAKE],
  'x2idn.24xlarge': [COMPUTE_PROCESSOR_TYPES.ICELAKE],
  'x2idn.32xlarge': [COMPUTE_PROCESSOR_TYPES.ICELAKE],
  'x2idn.metal': [COMPUTE_PROCESSOR_TYPES.ICELAKE],
  'x2iedn.xlarge': [COMPUTE_PROCESSOR_TYPES.ICELAKE],
  'x2iedn.2xlarge': [COMPUTE_PROCESSOR_TYPES.ICELAKE],
  'x2iedn.4xlarge': [COMPUTE_PROCESSOR_TYPES.ICELAKE],
  'x2iedn.8xlarge': [COMPUTE_PROCESSOR_TYPES.ICELAKE],
  'x2iedn.16xlarge': [COMPUTE_PROCESSOR_TYPES.ICELAKE],
  'x2iedn.24xlarge': [COMPUTE_PROCESSOR_TYPES.ICELAKE],
  'x2iedn.32xlarge': [COMPUTE_PROCESSOR_TYPES.ICELAKE],
  'x2iedn.metal': [COMPUTE_PROCESSOR_TYPES.ICELAKE],
  'x2iezn.2xlarge': [COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE],
  'x2iezn.4xlarge': [COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE],
  'x2iezn.6xlarge': [COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE],
  'x2iezn.8xlarge': [COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE],
  'x2iezn.12xlarge': [COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE],
  'x2iezn.metal': [COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE],
  'dl1.24xlarge': [COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE],
  'vt1.3xlarge': [COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE],
  'vt1.6xlarge': [COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE],
  'vt1.24xlarge': [COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE],
  'Im4gn.large': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON_2],
  'Im4gn.xlarge': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON_2],
  'Im4gn.2xlarge': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON_2],
  'Im4gn.4xlarge': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON_2],
  'Im4gn.8xlarge': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON_2],
  'Im4gn.16xlarge': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON_2],
  'Is4gen.medium': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON_2],
  'Is4gen.large': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON_2],
  'Is4gen.xlarge': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON_2],
  'Is4gen.2xlarge': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON_2],
  'Is4gen.4xlarge': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON_2],
  'Is4gen.8xlarge': [COMPUTE_PROCESSOR_TYPES.AWS_GRAVITON_2],
  'i4i.large': [COMPUTE_PROCESSOR_TYPES.ICELAKE],
  'i4i.xlarge': [COMPUTE_PROCESSOR_TYPES.ICELAKE],
  'i4i.2xlarge': [COMPUTE_PROCESSOR_TYPES.ICELAKE],
  'i4i.4xlarge': [COMPUTE_PROCESSOR_TYPES.ICELAKE],
  'i4i.8xlarge': [COMPUTE_PROCESSOR_TYPES.ICELAKE],
  'i4i.16xlarge': [COMPUTE_PROCESSOR_TYPES.ICELAKE],
  'i4i.32xlarge': [COMPUTE_PROCESSOR_TYPES.ICELAKE],
  'u-3tb1.56xlarge': [COMPUTE_PROCESSOR_TYPES.UNKNOWN],
  'u-6tb1.56xlarge': [COMPUTE_PROCESSOR_TYPES.UNKNOWN],
  'u-6tb1.112xlarge': [COMPUTE_PROCESSOR_TYPES.UNKNOWN],
  'u-9tb1.112xlarge': [COMPUTE_PROCESSOR_TYPES.UNKNOWN],
  'u-12tb1.112xlarge': [COMPUTE_PROCESSOR_TYPES.UNKNOWN],
}

export const GPU_INSTANCES_TYPES: {
  [instanceType: string]: number // number of GPUs per instance
} = {
  'p2.xlarge': 1,
  'p2.8xlarge': 8,
  'p2.16xlarge': 16,
  'p3.2xlarge': 1,
  'p3.8xlarge': 4,
  'p3.16xlarge': 8,
  'p3dn.24xlarge': 8,
  'p4d.24xlarge': 8,
  'g2.2xlarge': 1,
  'g2.8xlarge': 4,
  'g3s.xlarge': 1,
  'g3.4xlarge': 1,
  'g3.8xlarge': 2,
  'g3.16xlarge': 4,
  'g4dn.xlarge': 1,
  'g4dn.2xlarge': 1,
  'g4dn.4xlarge': 1,
  'g4dn.8xlarge': 1,
  'g4dn.16xlarge': 1,
  'g4dn.12xlarge': 4,
  'g4dn.metal': 8,
  'g4ad.4xlarge': 1,
  'g4ad.8xlarge': 2,
  'g4ad.16xlarge': 4,
  'g5.xlarge': 1,
  'g5.2xlarge': 1,
  'g5.4xlarge': 1,
  'g5.8xlarge': 1,
  'g5.16xlarge': 1,
  'g5.12xlarge': 4,
  'g5.24xlarge': 4,
  'g5.48xlarge': 8,
  'g5g.xlarge': 1,
  'g5g.2xlarge': 1,
  'g5g.4xlarge': 1,
  'g5g.8xlarge': 1,
  'g5g.16xlarge': 2,
  'g5g.metal': 2,
}

export const INSTANCE_TYPE_GPU_PROCESSOR_MAPPING: {
  [instanceType: string]: string[]
} = {
  'p2.xlarge': [COMPUTE_PROCESSOR_TYPES.NVIDIA_TESLA_K80],
  'p2.8xlarge': [COMPUTE_PROCESSOR_TYPES.NVIDIA_TESLA_K80],
  'p2.16xlarge': [COMPUTE_PROCESSOR_TYPES.NVIDIA_TESLA_K80],
  'p3.2xlarge': [COMPUTE_PROCESSOR_TYPES.NVIDIA_TESLA_V100],
  'p3.8xlarge': [COMPUTE_PROCESSOR_TYPES.NVIDIA_TESLA_V100],
  'p3.16xlarge': [COMPUTE_PROCESSOR_TYPES.NVIDIA_TESLA_V100],
  'p3dn.24xlarge': [COMPUTE_PROCESSOR_TYPES.NVIDIA_TESLA_V100],
  'p4d.24xlarge': [COMPUTE_PROCESSOR_TYPES.NVIDIA_TESLA_A100],
  'g2.2xlarge': [COMPUTE_PROCESSOR_TYPES.NVIDIA_K520],
  'g2.8xlarge': [COMPUTE_PROCESSOR_TYPES.NVIDIA_K520],
  'g3s.xlarge': [COMPUTE_PROCESSOR_TYPES.NVIDIA_TESLA_M60],
  'g3.4xlarge': [COMPUTE_PROCESSOR_TYPES.NVIDIA_TESLA_M60],
  'g3.8xlarge': [COMPUTE_PROCESSOR_TYPES.NVIDIA_TESLA_M60],
  'g3.16xlarge': [COMPUTE_PROCESSOR_TYPES.NVIDIA_TESLA_M60],
  'g4dn.xlarge': [COMPUTE_PROCESSOR_TYPES.NVIDIA_T4],
  'g4dn.2xlarge': [COMPUTE_PROCESSOR_TYPES.NVIDIA_T4],
  'g4dn.4xlarge': [COMPUTE_PROCESSOR_TYPES.NVIDIA_T4],
  'g4dn.8xlarge': [COMPUTE_PROCESSOR_TYPES.NVIDIA_T4],
  'g4dn.16xlarge': [COMPUTE_PROCESSOR_TYPES.NVIDIA_T4],
  'g4dn.12xlarge': [COMPUTE_PROCESSOR_TYPES.NVIDIA_T4],
  'g4dn.metal': [COMPUTE_PROCESSOR_TYPES.NVIDIA_T4],
  'g4ad.4xlarge': [COMPUTE_PROCESSOR_TYPES.AMD_RADEON_PRO_V520],
  'g4ad.8xlarge': [COMPUTE_PROCESSOR_TYPES.AMD_RADEON_PRO_V520],
  'g4ad.16xlarge': [COMPUTE_PROCESSOR_TYPES.AMD_RADEON_PRO_V520],
  'g5.xlarge': [COMPUTE_PROCESSOR_TYPES.NVIDIA_A10G],
  'g5.2xlarge': [COMPUTE_PROCESSOR_TYPES.NVIDIA_A10G],
  'g5.4xlarge': [COMPUTE_PROCESSOR_TYPES.NVIDIA_A10G],
  'g5.8xlarge': [COMPUTE_PROCESSOR_TYPES.NVIDIA_A10G],
  'g5.16xlarge': [COMPUTE_PROCESSOR_TYPES.NVIDIA_A10G],
  'g5.12xlarge': [COMPUTE_PROCESSOR_TYPES.NVIDIA_A10G],
  'g5.24xlarge': [COMPUTE_PROCESSOR_TYPES.NVIDIA_A10G],
  'g5.48xlarge': [COMPUTE_PROCESSOR_TYPES.NVIDIA_A10G],
  'g5g.xlarge': [COMPUTE_PROCESSOR_TYPES.NVIDIA_T4], // Note: this family actually has a custom T4G processor, but we default to T4 because there is no energy data available.
  'g5g.2xlarge': [COMPUTE_PROCESSOR_TYPES.NVIDIA_T4],
  'g5g.4xlarge': [COMPUTE_PROCESSOR_TYPES.NVIDIA_T4],
  'g5g.8xlarge': [COMPUTE_PROCESSOR_TYPES.NVIDIA_T4],
  'g5g.16xlarge': [COMPUTE_PROCESSOR_TYPES.NVIDIA_T4],
  'g5g.metal': [COMPUTE_PROCESSOR_TYPES.NVIDIA_T4],
}
